<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/layui/css/layui.css">
    <script type="text/javascript" src="/static/admin/layui/layui.js"></script>
</head>
<body style="background: #1E9FFF">
<div style="position: absolute; left:50%;top:50%;width: 500px;margin-left: -250px;margin-top: -200px;">
    <div style="background: #ffffff;padding: 20px;border-radius: 4px;box-shadow: 5px 5px 20px #444444;">
        <div class="layui-form">
            <div class="layui-form-item" style="color:gray;">
                <h2>后台管理系统</h2>
            </div>
            <hr>
            <div class="layui-form-item">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-block">
                    <input type="text" id="username" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                <div class="layui-input-block">
                    <input type="password" id="password" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">验证码</label>
                <div class="layui-input-inline">
                    <input type="text" id="verifycode" class="layui-input">
                </div>
                <div><img src="{:captcha_src()}" id="img" onclick="reloadImg()"/></div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" onclick="dologin()">登录</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['layer'],function(){
        $ = layui.jquery;
    });
    // 重新生成验证码
    function reloadImg(){
        $('#img').attr('src','{:captcha_src()}?rand='+Math.random());
    }


</script>
</html>